home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1998 September / EnigmA AMIGA RUN 30 (1998)(G.R. Edizioni)(IT)[!][issue 1998-09].iso / recent / nag_me.lha / nag_me.p < prev    next >
Text File  |  1996-07-09  |  1KB  |  58 lines

  1. Program Nag_me;
  2.  
  3. {$I "Include:Exec/Ports.i"}
  4. {$I "Include:Exec/Libraries.i"}
  5. {$I "Include:Graphics/Graphics.i"}
  6. {$I "include:Graphics/Pens.i"}
  7. {$I "Include:Intuition/Intuition.i"}
  8.  
  9.  
  10. var
  11.     W : WindowPtr;
  12.     IM : IntuiMessagePtr;
  13.     Quit : Boolean;
  14.     t : Integer;
  15.  
  16. Const
  17.  
  18.     MyWindow : NewWindow = (0,0,100,30,-1,-1,
  19.             CLOSEWINDOW_f,
  20.             WINDOWDRAG + WINDOWDEPTH +
  21.             WINDOWCLOSE,
  22.             Nil, { Could add all gadgets automatically here }
  23.             Nil,
  24.             "",
  25.             Nil,
  26.             Nil,
  27.             138,
  28.             100,
  29.             -1,-1,
  30.             WBENCHSCREEN_f);
  31.  
  32. Function OpenNewWindow : Boolean;
  33. begin
  34.     W := OpenWindow(@MyWindow);
  35.     OpenNewWindow := W <> Nil;
  36. end;
  37.  
  38. begin
  39. GfxBase := OpenLibrary("graphics.library",0);
  40.     if OpenNewWindow then begin
  41.  
  42.     Move(W^.RPort,17,21);
  43.     GText(W^.RPort,"Time up!",8);
  44.  
  45.     repeat
  46.         IM := IntuiMessagePtr(WaitPort(W^.UserPort));
  47.         IM := IntuiMessagePtr(GetMsg(W^.UserPort));
  48.         with IM^ do begin
  49.         Quit := Class = CLOSEWINDOW_f;
  50.         end;
  51.         ReplyMsg(MessagePtr(IM));
  52.     until Quit;
  53.     CloseWindow(W);
  54.     end else
  55.     Writeln('Could not open the window');
  56. CloseLibrary(GfxBase);
  57. end.
  58.